package com.example.dao;

import com.example.entity.Periodical;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface PeriodicalDao extends JpaRepository<Periodical,Long>, JpaSpecificationExecutor<Periodical> {
    @Query(value = "select periodical from periodical where categories = ?", nativeQuery = true)
    List<String> findAllByCategories(String categories);
}
